package cn.edu.hznu.coursework.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import cn.edu.hznu.coursework.entity.Course;
import cn.edu.hznu.coursework.entity.Student;
import cn.edu.hznu.coursework.entity.StudentWork;
import cn.edu.hznu.coursework.entity.TeacherWork;

public interface StudentWorkRepository extends JpaRepository<StudentWork, Integer>{
	
	public List<StudentWork> findByTeacherWork(TeacherWork teacherWork);
	
	public List<StudentWork> findByStudent(Student student);
	
	public List<StudentWork> findByStudentAndCourse(Student student, Course course);
	
	public StudentWork findByStudentAndTeacherWork(Student student, TeacherWork teacherWork);
	
}
